package com.hjq.mallware.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @auther HJQ
 */
@Configuration
@MapperScan("com.hjq.mallware.dao")
@EnableTransactionManagement
public class WateMybatisConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor interceptor = new PaginationInterceptor();
        interceptor.setLimit(10000L);
        interceptor.setOverflow(true);
        return  interceptor;


    }
}
